2 using System
.Collections
.Generic
;
3 using System
.Reflection
;
8 public class BoundMethodCallable
: MethodCallable
10 protected Object boundObj
;
11 public BoundMethodCallable(MethodInfo method
, Object boundObj
):base(method
)
13 this.boundObj
= boundObj
;
15 public override void readParameter(PxpRequest req
)
17 ServerContext c
= req
.context
;
18 Object
[] args
= new Object
[argList
.Length
];
19 if (firstInputParamIndex
>= 1)
23 for (int i
= firstInputParamIndex
; i
< argList
.Length
; i
++)
25 args
[i
] = readNext(c
, argList
[i
]);
27 req
.parameter
= new Object
[] { null, args }
;
29 public override void call(PxpRequest req
, Action
<Object
> asyncRet
)
31 ServerContext ctx
= req
.context
;
34 Object
[] args
= (Object
[])((Object
[])req
.parameter
)[1];
35 if (firstInputParamIndex
>= 1)
41 result
= method
.Invoke(this.boundObj
, args
);
42 if (firstInputParamIndex
== 0)
49 asyncRet(ex
.InnerException
);